﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.OA.Utils;
namespace Ccit.OA.Scheduler
{
    public partial class scheduler_Param_frame : Ccit.Utils.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _hidFlag.Value = (Request.QueryString["Flag"] != null) ? Request.QueryString["Flag"].ToString() : "";
                _hidType.Value = (Request.QueryString["typeId"] != null) ? Request.QueryString["typeId"].ToString() : "";
                _hidTabId.Value = (Request.QueryString["TABID"] != null) ? Request.QueryString["TABID"].ToString() : "";
            }
            DataBindListBox();
        }

        private void DataBindListBox()
        {
               SchedulerBLL Bll = new SchedulerBLL();
               DataSet dSet = new DataSet();
               if (_hidType.Value == "")
               {
                   dSet = Bll.GetDictLibMes("993");
               }
               else
               {
                   dSet = Bll.GetDictLibMes(_hidType.Value);
               }
               if (dSet.Tables[0].Rows.Count > 0)
               {
                   for (int i = 0; i < dSet.Tables[0].Rows.Count;i++ )
                   {
                       DataRow dRow = dSet.Tables[0].Rows[i];
                       lstType.Items.Add(new ListItem(dRow["typeName"].ToString(),dRow["typeNum"].ToString()));
                   }
               } 
        }
    }
}
